var mongoose = require('mongoose');
mongoose.connect('mongodb://esf:ershowfang@122.51.104.38:27017/esfdb?authSource=admin');
const conn = mongoose.connection;
conn.on('connected',()=>{
    console.log('mongo connect success');
})
conn.on('error',(err)=>{
    console.log('mongo connect fail',err);
})
module.exports = mongoose;